import { appEnvNamespace } from '@/config'
import type { Lang } from '@/i18n'
import type { Theme } from '@/service/theme.service'
import { BaseLocalStorage } from '@lhy-assist/utils'

// 登出事件广播
export const broadcastLogoutLocal = new BaseLocalStorage({
  name: `${appEnvNamespace}/broadcastLogoutLocal`,
})
// 登录事件广播
export const broadcastLoginLocal = new BaseLocalStorage({
  name: `${appEnvNamespace}/broadcastLoginLocal`,
})

/**
 * 系统主题色
 */
export const themeLocal = new BaseLocalStorage<Theme>({
  name: `${appEnvNamespace}/themeLocal`,
})

/**
 * 语言
 */
export const localeLocal = new BaseLocalStorage<Lang>({
  name: `${appEnvNamespace}/localeLocal`,
})
